package com.juc.threadPoolExecutor.threadPoolExecutor5;

/**
 * 
 * 验证：调用shutdownNew()方法后队列中 的任务被取消运行，
 * 方法shutdownNew()返回值List<Runnable>,List对象存储的
 * 是还未运行的任务，也就是被取消的任务
 *
 */
public class MyRunnableA implements Runnable{

	private String username;
	
	public MyRunnableA(String username) {
		super();
		this.username = username;
	}
	public String getUserName() {
		return username;
	}
	@Override
	public void run() {
		for (int i = 0; i < Integer.MAX_VALUE / 500; i++) {
			String newString1  = new String();
			String newString5  = new String();
			String newString6  = new String();
			String newString7  = new String();
            Math.random();
            Math.random();
            Math.random();
		}
		System.out.println(Thread.currentThread().getName() + " 任务完成！");
	}

}
